package com.waya.web.browser.util;

import android.content.Context;
import android.content.pm.PackageManager;

/**
 * Created by JesseHev on 2017/12/4.
 * describe: 辅助工具类
 */

public class CommonUtil {

  /**
   * 是否声明了权限
   *
   * @param permission 权限定义
   */
  public static boolean checkPermission(Context context, String permission) {
    int perm = context.checkCallingOrSelfPermission(permission);
    return perm == PackageManager.PERMISSION_GRANTED;
  }
}
